import Vue from 'vue'
import VueRouter from 'vue-router'
import Cart from '../views/Cart.vue'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import Detail from '../views/Detail.vue'
import Personal from '../views/Personal.vue'
import More from '../views/More.vue'
import Order from '../views/Order.vue'
import MyOrder from '../views/MyOrder.vue'
import Pay from '../views/Pay.vue'
import History from '../views/History.vue'
import Comment from '../views/Comment.vue'
import Chat from '../views/Chat.vue'
import Blog from '../views/Blog.vue'
import Blog2 from '../views/Blog2.vue'
import BlogList from '../views/BlogList.vue'
Vue.use(VueRouter)

const routes = [{
        path: '/',
        redirect: '/home'
    },
    {
        path: '/blogList',
        name: 'BlogList',
        component: BlogList
    },
    {
        path: '/blog',
        name: 'Blog',
        component: Blog
    },
    {
        path: '/blog2',
        name: 'Blog2',
        component: Blog2
    },
    {
        path: '/cart',
        name: 'Cart',
        component: Cart
    },
    {
        path: '/home',
        name: 'Home',
        component: Home
    },
    {
        path: '/login',
        name: 'Login',
        component: Login
    },
    {
        path: '/register',
        name: 'Register',
        component: Register
    }, {
        path: '/detail',
        name: 'Detail',
        component: Detail
    }, {
        path: '/personal',
        name: 'Personal',
        component: Personal
    }, {
        path: '/more',
        name: 'More',
        component: More
    }, {
        path: '/order',
        name: 'Order',
        component: Order
    }, {
        path: '/myorder',
        name: 'MyOrder',
        component: MyOrder
    }, {
        path: '/pay',
        name: 'Pay',
        component: Pay
    }, {
        path: '/history',
        name: 'History',
        component: History,
    }, {
        path: '/comment',
        name: 'Comment',
        component: Comment,
    }, {
        path: '/chat',
        name: 'Chat',
        component: Chat,
    }

]

const router = new VueRouter({
    routes
})


export default router